<%@page contentType="text/html; charset=UTF-8" language="java" %>
<%@ page import="com.mew.util.servlet.ParameterParser" %>
<html>
<head>
<title></title>
<script type="text/javascript" src="js/util.js"></script>
<script type="text/javascript" src="js/ajaxCaller.js"></script>
<!--
    Use the "onload" event to start the refresh process.
-->
<body>
<%
  String SchoolID = ParameterParser.getStringParameter(request,"SchoolID", "-1");
  String listenID = ParameterParser.getStringParameter(request,"listenID", "-1");
%>
<script language="JavaScript">
window.setInterval(ajaxGet, 2000);
function ajaxGet() {
  //signalLoadingResults();
  var date = new Date();
  ajaxCaller.get("a_test.jsp?action=GETLATESTCARD&SchoolID=<%=SchoolID%>&listenID=<%=listenID%>&t="+date.getYear()+date.getMonth()+date.getDate()+date.getHours()+date.getMinutes()+date.getSeconds(), null, onResponse, false,
                 "a get request");
}
function signalLoadingResults() {
  resultBlock = $("result");
  resultBlock.innerHTML = "Loading ...";
}
function onResponse(text, headers, callingContext) {
  var resultBlock = $("result");
  if(text.length>10){
  	resultBlock.innerHTML ="<li>" +text +"</li>"+ resultBlock.innerHTML ;
  }
}
</script>
<body>
<p align="center"><strong>实时刷卡记录</strong></p>
<p align="center">&nbsp;</p>
<div align="center" id="result"></div>
<div align="center">
  <input type="reset" name="Submit2" value="返　回" onClick="history.back()" />
</div>
</body>
</html>
